home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.8 KB | 46 lines | [TEXT/GEOL] |
- Item 2114559 7-Feb-91 12:13PST
-
- From: MM.XOBJ MacroMind, XObject Support,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- ------------------------------------------------------------------------------
-
- Sub: need help with TDocument!
-
- I need help from someone who is intimate with the workings of TDocument.
-
- My application uses disk based documents. They never have a "memory only"
- existence. In this regard it is similar to HyperCard, which always updates an
- open disk image of the document.
-
- TDocument is strongly oriented in favor of memory-based documents, and thinks
- that it is cool to open a new file whenever it is time to save, and delete the
- prior copy of the file afterwords.
-
- From the time I create a new document, or open an existing file, I need to keep
- the Data fork open (the only one I use), and whenever saving the file, I need
- to make sure that the file I write to is the same as the one I originally
- opened. Even when I create a new Document, I open a file and install it in the
- Document instance from my DoInitialState() method like this:
-
- RequestAFileName(...); // get a filename, directory from user
- OpenAFile(...); // open a file of that name
- SavedOn(...); // install all this info in TDocument
-
- I am trying to address this issue by overriding SaveInPlace(), and setting
- fSaveInPlace = sipAlways. However, this method is only called under very
- limited circumstances, as a last resort to saving a file that would not
- otherwise fit.
-
- I just cannot figure out from all the MacApp documentation and examples what I
- need to do to keep the file (and its refnum) I orginally open the same
- throughout the editing process.
-
- Can someone help me figure this out?
-
- Haim Zamir
- MacroMind, Inc.
- AppleLink MM.XOBJ
-
-